home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / fzartmap.nnc < prev    next >
Text File  |  1993-08-23  |  3KB  |  86 lines

  1. csv3.8        !file format is Control Strategy Version 3.8
  2. ! Jun 1992  (fzartmap.nnc)  Fuzzy ARTMAP Network control strategy
  3. !************************************************************************
  4. !*                                    *
  5. !*    Fuzzy ARTMAP Control Strategy                    *
  6. !*                                    *
  7. !************************************************************************
  8. ! Note:  This implementation has been written with performance
  9. ! rather than neuralogical plausability in mind.  The algorithmic
  10. ! form of Fuzzy ARTMAP has been mapped to the NeuralWorks model
  11. ! in as efficient a way as possible.  Therefore, there is no
  12. ! explicit representation of the two layer resonance, gain control
  13. ! sub-system and orienting sub-system which can be seen in the
  14. ! NeuralWorks implementation of ART1.
  15. !
  16. !MASK     label    op-code    operands    comment
  17. L_saR_sa    trace    aux3        !  0 set trace option to aux3
  18. L_saRi_a    cset    recall,0    !  1 recall count
  19. !
  20. ! Get input (learn/test/recall) and desired output (learn/test)
  21. !
  22. L_saRi_a    lset    in        !  2 input layer
  23. L___Ri_a    io    read        !  3 get input data (recall)
  24. L_saR___    io    lrnin        !  4 get input data (learn)
  25. L_saRi_a    lset    out        !  5 output layer
  26. L_saR___    io    lrnout        !  6 get desired output (learn)
  27. L___Ri_a    io    rcltst        !  7 get desired output (test)
  28. L_saRi_a    math    ce=e|fire    !  8 Save desired output
  29. !
  30. ! Process Input Layer
  31. !
  32. L_saRi_a    lset    in        !  9 input layer
  33. L___Ri_a     math    sum|rnoise|tran|output      ! 10
  34. L_saR___    math    sum|lnoise|tran|output|fire ! 11
  35. !
  36. ! Complement Coding (Pre-processing)
  37. !
  38. L_saRi_a        lset    in,1            ! 12 Complement layer
  39. L_saRi_a        math    sum|tran|output|fire  ! 13 Obtain complements
  40. !
  41. ! Category Layer
  42. !
  43. L_saRisa        lset    out,-1          ! 14 Category layer
  44. L_saRi_a        math    sum|tran|fire    ! 15 Initialize outputs
  45. L_saR_sa @ctout math    o=0|output|fire    ! 16 Current output
  46. !
  47. ! Output Layer
  48. !
  49. L_saR_sa    lset    out             ! 17 Output layer
  50. L_saR_sa    math    sum|e=ce|tran|e-=w|fire ! 18 Error before output
  51. L_saR_sa    math    output|fire    ! 19 Generate output
  52. !
  53. ! Check if it was an uncommitted node that won or if there are no
  54. ! nodes left
  55. !
  56. L_saR___        ccmp    wrk2,0          ! 20 node already committed?
  57. L_saR___        beq     @nolrn          ! 21 yes
  58. L_saR___        ccmp    wrk2,2          ! 22 out of nodes?
  59. L_saR___        beq     @doout          ! 23 yes
  60. L_saR___        math    learn|fire      ! 24 Learn output map
  61. L_saR___    math    output|fire    ! 25 Regenerate output value
  62. L_saR___        br      @lncat        ! 26
  63. !
  64. ! Test out results of match
  65. L_saR___ @nolrn    ccmp    wrk1,0          ! 27 wrk1=1 if error no good
  66. L_saR___        beq     @lncat        ! 28
  67. !
  68. ! Go back to category layer and get another winner
  69. !
  70. L_saR___        cadd    recall,1        ! 29 increment recall counter
  71. L_saR___    lset    out        ! 30 output layer
  72. L_saR___        io      wrstep        ! 31 learn step
  73. L_saR___     lset    out,-1          ! 32 category layer
  74. L_saR___        brct    @ctout          ! 33 try again
  75. !
  76. ! Update category weights
  77. !
  78. L_saR___ @lncat lset    out,-1          ! 34 category layer
  79. L_saR___    math    learn|fire    ! 35 
  80. L_saR_sa @doout    lset    out        ! 36 output layer
  81. L_saR_sa    math    ce=e|fire    ! 37 final error
  82. L_saR___    io    lrnrslt        ! 38 learn result
  83. L___R_sa    io    write        ! 39 recall result
  84. !
  85. LisaRisa    trace   0               ! 40  turn off any trace function
  86.